#ifndef _CGI_INTERFACE_H
#define _CGI_INTERFACE_H

#include "global_val.h"
/*********************************************************************
 * room_id:ZIGBEE_BEDROOM ZIGBEE_LIVINGROOM
 *         ZIGBEE_KITCHEN ZIGBEE_BATHROOM(global_val.h文件)
 *
 * 获取状态:获取到的状态 0代表on  1代表off
 *
 * 设置状态:根据global_val.h中的宏定义进行赋值
 *
 *
 *********************************************************************/

int CGI_Logic_Judge(char *user_name, char *user_passwd);
int CGI_Led_Control(const char *dev_mac, const unsigned int led_id, const unsigned char led_status);
int CGI_Led_Control_RE(const char *dev_mac, const unsigned char led_status);
int CGI_Get_Led_Status(const char *dev_mac, const unsigned int led_id);
int CGI_Get_Temperature(const char *dev_mac);
int CGI_Get_Humidity(const char *dev_mac);
int CGI_Get_Light_Intensity(const char *dev_mac);
int CGI_Door_Control(const char *dev_mac, const unsigned char door_status);
int CGI_Get_Door_Status(const char *dev_mac);
int CGI_Get_Smoke_Status(const char *dev_mac);
int CGI_Beep_Control(const char *dev_mac, const unsigned char beep_status);
int CGI_Get_Beep_Status(const char *dev_mac);
int CGI_Fan_Control(const char *dev_mac, const unsigned char fan_status);
int CGI_Get_Fan_Status(const char *dev_mac);
int CGI_Calorifier_Control(const char *dev_mac, const unsigned char calorifier_status);
int CGI_Get_Calorifier_Status(const char *dev_mac);
int CGI_Curtain_Control(const char *dev_mac, const unsigned char curtain_status);
int CGI_Get_Curtain_Status(const char *dev_mac);
int CGI_Get_Online_DEV_Count(void);
int Update_Dev_List(void);
int Update_Dev_List_cfg(void);
int Set_Dev_Cfg(const char *table_name, char field_str[][1024], int n);
int Set_Sensor_Cfg(const char type, char field_str[][1024], int n);
int Get_Sensor_info(int type, char *result_str);
int delete_zb_node(const char *dev_mac);
int add_alarm_task(char *alarm_name, char *dev_mac, char sensor_type, char sensor_status, char *alarm_time, char alarm_repeat, char alarm_status);
int send_alarm_task_info(char *result_str);
int delete_timing_node(int alarm_task_id);
int update_alarm_task(const int alarm_id, char field_value[][128]);
int insert_emergency_call_number(const char *number);
int updata_emergency_call_number(const int id, const char *number);
int del_emergency_call_number(const int id);
int get_emergency_call_number(char *result_str);

#endif
